package com.wondertek.service.sdk.iotdh.dto.res;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetector.ExternaSensors;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetector.OverTemperatureAlarm;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetector.SirenLinkage;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetectorPlus.DoorSensor;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetectorPlus.ShockSensor;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetectorPlus.TiltSensor;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author zgf
 * @Date 2024/8/2 10:55
 */
@Data
public class GetAccessoryInfoRes {

    @Schema(name = "blockState ",description = "1：不阻塞;2：阻止。")
    private String blockState;

    private Heartbeat heartbeat;

    private List<ArmingInfo> armingInfo;

    @Schema(name = "type",description = "配件类型")
    private String type;

    @Schema(name = "channel ",description = "仅存在 IPC")
    private Integer channel;

    @Schema(name = "defenceStatus24H",description = "false: Disabled; true:Enabled")
    private boolean defenceStatus24H;

    private ShockSensor shockSensor;

    private Output output;

    @Schema(name = "operationMode", description = "SOS；Panic；Control；MuteFireAlarm", required = false)
    private String operationMode;

    @Schema(name = "externalAlarmEnable", description = "false: Disable; true:Enable.", required = false)
    private boolean externalAlarmEnable;

    private SirenLinkage sirenLinkage;

    @Schema(name = "sensorType",description = "传感器⽅式")
    private String sensorType;

    private TiltSensor tiltSensor;

    @Schema(name = "model",description = "配件型号 不同配件不⼀样，扫描配件⼆维码即可查看")
    private String model;

    private OverTemperatureAlarm overTemperatureAlarm;

    @Schema(name = "id",description = "配件id")
    private String id;

    @Schema(name = "state",description = "0：所有功能均已启用;1：禁用篡改;2所有功能均禁用")
    private Integer state;

    @Schema(name = "exitDelay",description = "退出延时 设置布防时使⽤，单位：秒")
    private Integer exitDelay;

    @Schema(name = "chime",description = "铃音true：启用 false：禁用")
    private boolean chime;

    @Schema(name = "powerRegulation",description = "High: 3; low: 1;automatic: 0.")
    private Integer powerRegulation;

    private DoorSensor doorSensor;

    @Schema(name = "ledBrightnessLevel", description = "Backlight brightness level: 0-Off; 1-Lowest; 2-Moderate; 3-Highest", required = false)
    private int ledBrightnessLevel;

    @Schema(name = "entryDelay", description = "Validity time of entering delay in seconds (0–120)", required = false)
    private int entryDelay;

    @Schema(name = "supplyMode", description = "External power supply: 1-always on; 2-open when the defense is removed; 3-always disabled", required = false)
    private int supplyMode;

    @Schema(name = "controlAreaIds", description = "List of control area IDs", required = false)
    private List<String> controlAreaIds;

    @Schema(name = "recordEnable", description = "Enable the alarm linkage video channel", required = false)
    private boolean recordEnable;

    @Schema(name = "version", description = "配件版本", required = false)
    private String version;

    @Schema(name = "ledEnable", description = "led true：启用 false：禁用", required = false)
    private boolean ledEnable;

    @Schema(name = "alarmType", description = "Alarm types: Intrusion, fire, medical, panic, gas, and water leakage", required = false)
    private String alarmType;

    @Schema(name = "areaId", description = "配件所属分区id", required = false)
    private String areaId;

    private ExternalPowerSupply externalPowerSupply;

    @Schema(name = "name",description = "配件名称")
    private String name;

    @Schema(name = "online",description = "配件在离线状态 1：离线 2：在线")
    private Integer online;

    @Schema(name = "sensitivity",description = "3: High; 2:Medium 1: Low")
    private Integer sensitivity;

    private ExternaSensors externaSensors;

    @Schema(name = "recordChannels", description = "Linked video channel list", required = false)
    private List<String> recordChannels;

    @Schema(name = "antiMispress", description = "Enable accidental press prevention: 1-Off, press and hold for 0.1 sec. 2-Long press, press and hold for 2 sec. 3-Double press: Press the button twice at an interval of 1 sec.", required = false)
    private int antiMispress;

    @Schema(name = "sosEnable", description = "Enable SOS feature: false-Disable; true-Enable", required = false)
    private boolean sosEnable;

    private MovementDetected movementDetected;

    /*
     * 租赁开始时间
     * */
    @Schema(name = "startDate",description = "开始时间")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    /*
     * 租赁结束时间
     * */
    @Schema(name = "endDate",description = "结束时间")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

}
